﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace Deflection
{
    class Projectile : GameObject
    {

        public enum ProjectileType
        {
            Missile,
            PlayerBasicProjectile
        }

        private Vector2 direction;
        public Vector2 Direction
        {
            get { return direction; }
            set { direction = value; }
        }
        private float speed;
        public float Speed
        {
            get { return speed; }
            set { speed = value; }
        }

        public Projectile(Vector2 Position, Vector2 direction) : base(Position)
        {
            this.speed = GameParameters.PLAYER_PROJECTILE_SPEED;
            this.direction = direction;
        }

        public override void Update(GameTime gameTime)
        {
            this.direction.Normalize();
            this.position += this.direction * this.speed;
            //this.CheckForCollisions();
            base.Update(gameTime);
        }

    }
}
